//
//  LeftViewController.m
//  MyLearnJob
//
//  Created by qianfeng on 15-7-1.
//  Copyright (c) 2015年 朱共营. All rights reserved.
//

#import "LeftViewController.h"
#import "RootViewController.h"
#import "ParticularsViewController.h"

@interface LeftViewController ()

@end

@implementation LeftViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatUI];
}
- (void)creatUI{
    NSArray *nameArr=@[@"全部课程",@"我的课程",@"离线缓存",@"我的消息",@"我的笔记",@"文章"];
    for (NSInteger i=0; i<nameArr.count; i++) {
        UIButton *button=[UIButton buttonWithType:UIButtonTypeSystem];
        button.frame=CGRectMake(0, kScreenSize.height/nameArr.count+40*i, kScreenSize.width/2-50, 40);
        [button setTitle:nameArr[i] forState:UIControlStateNormal];
        button.tag=101+i;
        [button addTarget:self action:@selector(btnClick1:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:button];
    }
    

}
- (void)btnClick1:(UIButton *)btn{
    switch (btn.tag-100) {
        case 1:
        {
            RootViewController *root=[[RootViewController alloc] init];
            NSLog(@"11");
            [self.navigationController pushViewController:root animated:YES];
            
        
        }
            break;
        case 2:
        {
            
        }
            break;
        case 3:
        {
            
        }
            break;
        case 4:
        {
            
        }
            break;
        case 5:
        {
            
        }
            break;
        case 6:
        {
            
        }
            break;
            
        default:
            break;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
